package com.hpeng.sys.model;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "SYS_TEMPLATE_AUTHORITY")
public class SysTemplateAuth {
	private SysTemplateAuthPK id;
	private String accessRight;

	public SysTemplateAuth() {
	}

	public SysTemplateAuth(SysTemplateAuthPK id) {
		this.id = id;
	}

	public SysTemplateAuth(String templateCode, String funcCode,
			String accessRight) {
		this.id = new SysTemplateAuthPK(templateCode, funcCode);
		this.accessRight = accessRight;
	}

	@EmbeddedId
	public SysTemplateAuthPK getId() {
		return id;
	}

	public void setId(SysTemplateAuthPK id) {
		this.id = id;
	}

	@Column(name = "ACCESS_RIGHT")
	public String getAccessRight() {
		return accessRight;
	}

	public void setAccessRight(String accessRight) {
		this.accessRight = accessRight;
	}

}